import React from 'react'
import usePosition from '../hook/usePositon'

export default function Son2() {
  let { x, y } = usePosition()
  return (
    <div
      style={{
        position: 'absolute',
        transform: `translate(${x}px,${y}px)`,
        transition: 'all .1s',
        background: 'blue',
        border: '2px solid black',
        width: 100,
        height: 100,
      }}
    ></div>
  )
}
